//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatMaterial, WechatMaterialResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatMaterialList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatMaterialResponse>(`/uctoo/wechat_material/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatMaterial = async (id: string) => {
  return requestClient.get<WechatMaterial>(`/uctoo/wechat_material/${id}`);
};

export const adductooWechatMaterial = async (data: Partial<WechatMaterial>) => {
  return requestClient.post<WechatMaterial>('/uctoo/wechat_material/add', data);
};

export const edituctooWechatMaterial = async (data: Partial<WechatMaterial>) => {
  return requestClient.post<WechatMaterial>('/uctoo/wechat_material/edit', data);
};

export const deleteuctooWechatMaterial = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechat_material/del', { id });
};
